home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mgr / sparcmgr / demo2.zoo / demo / ex / ed.hup < prev    next >
Encoding:
Text File  |  1987-04-24  |  6.0 KB  |  193 lines

  1. #
  2. # Copyright (c) 1980 Regents of the University of California.
  3. # All rights reserved.  The Berkeley software License Agreement
  4. # specifies the terms and conditions for redistribution.
  5. #
  6. #    @(#)Makefile    7.14 (Berkeley) 3/9/87
  7. #    %W% (Bellcore)    %E%
  8. #
  9. VERSION=3.7
  10. #
  11. # Ex skeletal makefile for VAX VM/Unix 4.2BSD
  12. #
  13. # NB: This makefile doesn't indicate any dependencies on header files.
  14. #
  15. # Ex is very large - this version will not fit on PDP-11's without overlay
  16. # software.  Things that can be turned off to save
  17. # space include LISPCODE (-l flag, showmatch and lisp options), UCVISUAL
  18. # (visual \ nonsense on upper case only terminals), CHDIR (the undocumented
  19. # chdir command.)  CRYPT includes the code to edit encrypted files (the -x
  20. # option, like ed.)  VMUNIX makes ex considerably larger, raising many limits
  21. # and improving speed and simplicity of maintenance.  It is suitable only
  22. # for a VAX or other large machine, and then probably only in a paged system.
  23. #
  24. # Don't define VFORK unless your system has the VFORK system call,
  25. # which is like fork but the two processes have only one data space until the
  26. # child execs. This speeds up ex by saving the memory copy.
  27. #
  28. # If your system expands tabs to 4 spaces you should -DTABS=4 below
  29. #
  30. BINDIR=    /usr/ucb
  31. NBINDIR=/usr/new
  32. LIBDIR=    /usr/lib
  33. FOLD=    ${BINDIR}/fold
  34. CTAGS=    ${BINDIR}/ctags
  35. XSTR=    ${BINDIR}/xstr
  36. DEBUGFLAGS=    -DTRACE -g
  37. NONDEBUGFLAGS=    -O
  38. DEB=    ${NONDEBUGFLAGS}    # or ${DEBUGFLAGS} to to debug
  39. OPTIONS= -DCRYPT -DLISPCODE -DCHDIR -DUCVISUAL -DVFORK -DVMUNIX -DFASTTAG\
  40.     -DUNIX_SBRK
  41. CFLAGS=    -DTABS=8 ${OPTIONS} ${DEB}
  42. LDFLAGS=    -z        # or -i or -n
  43. TERMLIB=    -ltermcap
  44. MKSTR=    ${BINDIR}/mkstr
  45. CXREF=    ${BINDIR}/cxref
  46. INCLUDE=/usr/include
  47. PR=    pr
  48. OBJS=    ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o \
  49.     ex_data.o ex_extern.o ex_get.o ex_io.o ex_put.o ex_re.o \
  50.     ex_set.o ex_subr.o ex_tagio.o ex_temp.o ex_tty.o ex_unix.o \
  51.     ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voper.o \
  52.     ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
  53.     printf.o bcopy.o strings.o
  54. HDRS=    ex.h ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_tune.h ex_vars.h ex_vis.h
  55. SRC1=    ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c
  56. SRC2=    ex_data.c ex_get.c ex_io.c ex_put.c ex_re.c
  57. SRC3=    ex_set.c ex_subr.c ex_tagio.c ex_temp.c ex_tty.c ex_unix.c
  58. SRC4=    ex_v.c ex_vadj.c ex_vget.c ex_vmain.c ex_voper.c
  59. SRC5=    ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c
  60. SRC6=    printf.c bcopy.c expreserve.c exrecover.c
  61. MISC=    makefile READ_ME rofix
  62. VGRIND=    csh /usr/ucb/vgrind
  63. VHDR=    "Ex Version ${VERSION}"
  64.  
  65. .c.o:
  66. # ifdef VMUNIX
  67.     ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
  68. # else
  69. #    ${MKSTR} - ex${VERSION}strings x $*.c
  70. #    ${CC} -E ${CFLAGS} x$*.c | ${XSTR} -c -
  71. #    rm -f x$*.c
  72. # endif
  73.     ${CC} ${CFLAGS} -c x.c 
  74.     mv x.o $*.o
  75.  
  76. all:    a.out exrecover expreserve
  77.  
  78. a.out: ${OBJS}
  79.     @echo loading a.out
  80.     @${CC} ${LDFLAGS} ${OBJS} ${TERMLIB}
  81.  
  82. tags:    /tmp
  83.     ${CTAGS} -w ex.[hc] ex_*.[hc]
  84.  
  85. ${OBJS}: ${HDRS}
  86.  
  87. ex_vars.h:    ex_data.c
  88.     csh makeoptions ${CFLAGS}
  89.  
  90. bcopy.o:    bcopy.c
  91.     ${CC} -c ${CFLAGS} bcopy.c
  92.  
  93. # xstr: hands off!
  94. strings.o: strings
  95.     ${XSTR}
  96.     ${CC} -c -S xs.c
  97.     ed - <rofix xs.s
  98.     ${AS} -o strings.o xs.s
  99.     rm xs.s
  100.     
  101. exrecover: exrecover.o
  102.     ${CC} ${CFLAGS} exrecover.o ex_extern.o -o exrecover
  103.  
  104. exrecover.o: exrecover.c
  105.     ${CC} ${CFLAGS} -c -O exrecover.c
  106.  
  107. expreserve: expreserve.o
  108.     ${CC} expreserve.o -o expreserve
  109.  
  110. expreserve.o:
  111.     ${CC} ${CFLAGS} -c -O expreserve.c
  112.  
  113. clean:
  114. #    If we dont have ex we cant make it so don't rm ex_vars.h
  115.     -rm -f a.out exrecover expreserve strings core errs trace
  116.     -rm -f *.o x*.[cs]
  117.  
  118. # install a new version for testing in /usr/new
  119. ninstall: a.out
  120.     -rm -f ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi ${DESTDIR}${NBINDIR}/view
  121.     cp a.out ${DESTDIR}${NBINDIR}/ex
  122. #    -cp ex${VERSION}strings ${LIBDIR}/ex${VERSION}strings
  123.     ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi
  124.     ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/view
  125.     chmod 1751 ${DESTDIR}${NBINDIR}/ex
  126.  
  127. # install in standard place (/usr/ucb)
  128. install: a.out exrecover expreserve
  129.     -rm -f ${DESTDIR}/${BINDIR}/ex
  130.     -rm -f ${DESTDIR}/${BINDIR}/vi
  131.     -rm -f ${DESTDIR}/${BINDIR}/view
  132.     -rm -f ${DESTDIR}/${BINDIR}/edit
  133.     -rm -f ${DESTDIR}/${BINDIR}/e
  134.     -rm -f ${DESTDIR}/usr/bin/ex
  135.     install -s -m 1751 a.out ${DESTDIR}/${BINDIR}/ex
  136. #    cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings
  137. #    ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/edit
  138. #    ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/e
  139.     ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/vi
  140. #    ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/view
  141. #    ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/usr/bin/ex
  142.     chmod 1751 ${DESTDIR}/${BINDIR}/ex
  143.     install -s -o root -m 4755 exrecover ${DESTDIR}/${LIBDIR}/ex${VERSION}recover
  144.     install -s -o root -m 4755 expreserve ${DESTDIR}/${LIBDIR}/ex${VERSION}preserve
  145. # The following line normally fails.  This is OK.
  146.     -mkdir ${DESTDIR}/usr/preserve
  147.  
  148. # move from /usr/new to /usr/ucb
  149. newucb: a.out
  150.     -rm -f ${DESTDIR}/${BINDIR}/ex
  151.     -rm -f ${DESTDIR}/${BINDIR}/vi
  152.     -rm -f ${DESTDIR}/${BINDIR}/edit
  153.     -rm -f ${DESTDIR}/${BINDIR}/e
  154.     -rm -f ${DESTDIR}/usr/bin/ex
  155.     mv ${DESTDIR}/${NBINDIR}/ex ${DESTDIR}/${NBINDIR}/ex
  156.     -rm -f ${DESTDIR}/${NBINDIR}/vi
  157.     ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/edit
  158.     ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/e
  159.     ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/vi
  160.     ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/usr/bin/ex
  161.     chmod 1755 ${DESTDIR}/${BINDIR}/ex
  162.  
  163. lint:
  164.     lint ${CFLAGS} ex.c ex_?*.c
  165.     lint ${CFLAGS} -u exrecover.c
  166.     lint ${CFLAGS} expreserve.c
  167.  
  168. print:
  169.     @${PR} READ* BUGS
  170.     @${PR} makefile*
  171.     @${PR} /etc/termcap
  172.     @(size -l a.out ; size *.o) | ${PR} -h sizes
  173.     @${PR} -h errno.h ${INCLUDE}/errno.h
  174.     @${PR} -h setjmp.h ${INCLUDE}/setjmp.h
  175.     @${PR} -h sgtty.h ${INCLUDE}/sgtty.h
  176.     @${PR} -h signal.h ${INCLUDE}/signal.h
  177.     @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h
  178.     @${PR} -h sys/types.h ${INCLUDE}/sys/types.h
  179.     @ls -ls | ${PR}
  180.     @${CXREF} *.c | ${PR} -h XREF
  181.     @${PR} *.h *.c
  182. vgrind:
  183.     tee index < /dev/null
  184.     ${VGRIND} -h ${VHDR} ${HDRS}
  185.     ${VGRIND} -h ${VHDR} ${SRC1}
  186.     ${VGRIND} -h ${VHDR} ${SRC2}
  187.     ${VGRIND} -h ${VHDR} ${SRC3}
  188.     ${VGRIND} -h ${VHDR} ${SRC4}
  189.     ${VGRIND} -h ${VHDR} ${SRC5}
  190.     ${VGRIND} -h ${VHDR} ${SRC6}
  191.     ${VGRIND} -n -h ${VHDR} ${MISC}
  192.     ${VGRIND} -i -h ${VHDR} index
  193.